-- GENERATED SPELL FOR [Novice Astromancer] --


function spell0_20044(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(38728,pUnit)
pUnit:RegisterEvent('Sorts_20044', 664, 1)
end

function spell1_20044(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(37282,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20044', 0, 1)
end

function spell2_20044(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(37111,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20044', 2000, 1)
end

function spell3_20044(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(37279,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20044', 6000, 1)
end

function Sorts_20044(pUnit, Event)
local choix_sorts_20044 = math.random(0, 3)
if choix_sorts_20044 == 0 then
pUnit:RegisterEvent('spell0_20044', 1, 1)
end
if choix_sorts_20044 == 1 then
pUnit:RegisterEvent('spell1_20044', 1, 1)
end
if choix_sorts_20044 == 2 then
pUnit:RegisterEvent('spell2_20044', 1, 1)
end
if choix_sorts_20044 == 3 then
pUnit:RegisterEvent('spell3_20044', 1, 1)
end
end

function mob20044_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20044', math.random(1500, 3000), 1)
end

function mob20044_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20044_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20044_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20044, 1, 'mob20044_Action')
RegisterUnitEvent(20044, 2, 'mob20044_Leave')
RegisterUnitEvent(20044, 3, 'mob20044_Kill')
RegisterUnitEvent(20044, 4, 'mob20044_Die')
